<template>
  <router-view v-if="showRouter"></router-view>
</template>
<script setup>
import {ref, provide, nextTick} from 'vue'

const showRouter = ref(true)
const reload = () => {
  showRouter.value = false
  nextTick(() => {
    showRouter.value = true
  })
}
provide('reload', reload)

const debounce = (fn, delay) => {
  let timer = null
  return function () {
    let context = this
    let args = arguments
    clearTimeout(timer)
    timer = setTimeout(function () {
      fn.apply(context, args);
    }, delay)
  }
}

const _ResizeObserver = window.ResizeObserver

window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
  constructor(callback) {
    callback = debounce(callback, 16)
    super(callback)
  }
}

</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif, PINGFANGBOLD;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  font-size: 16px;
  height: 100%;
  width: 100%;
}
h1{
  font-size: 35px;
  letter-spacing: 7px;
  font-family: Avenir, Helvetica, Arial, sans-serif, OPPOSansH;
}
a{
  text-decoration: auto;
}
.pagination-box {
  display: flex;
  justify-content: center;
  padding: 20px;
  .el-pagination {
    --el-pagination-font-size: 15px;
  }
  .el-pagination .btn-next .el-icon, .el-pagination .btn-prev .el-icon {
    font-size: 18px;
  }
}
</style>
